<?php
/**
 * Created by PhpStorm.
 * User: Tangyijun
 * Date: 2017/4/21
 * Time: 9:50
 */
namespace app\validate;
/**
 * =====================================
 * Class AdminValidate
 * @package app\admin\validate
 * 管理员登录验证规则
 * ====================================
 */
class AdminValidate{
    protected $rule = [
        'username'  =>  'require|max:25',
        'password'  =>  'require',
    ];

    protected $message  =   [
        'username.require' => '用户名必须填写',
        'username.max'     => '用户最多不能超过25个字符',

        'password.require' => '密码必须填写',
    ];
    public function adminValidate(){
        $validate['rule']    = $this->rule;
        $validate['message'] = $this->message;
        return $validate;
    }
}